package demo2;

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {

    public static void main1(String[] args) {
        int a = 10;
        String s = String.valueOf(a);

//        System.out.printf("%4.d%4.d%4.d\n",1,34,12344);
//        System.out.printf("%4.d\n%4.d\n%4.d\n",3,12,11123);  //右对齐；不足四位，前加空格；
//        System.out.printf("%.4d\n%.4d\n%.4f\n%.4f\n",23,2342,2.3,343.32);  //对小数，保留四位小数；对整数，不足四位，前加零；
//        System.out.printf("%-4.d%-4d\n",1,23423);  //左对齐；不足四位，后加空格；
//        System.out.printf("%-10s%-10s\n","asdsd","asdsfdgfhgh");  //不足十位，后加空格；
//        System.out.printf("%10s%10s\n","sdsfsf","sdsfdsgsgf");  //不足十位，前加空格；
//        System.out.printf("%10s\n","asdaff");  //输出十个空格；
//        System.out.printf("%.10s%.10s\n","asdad","sdsfdsgfgg"); //字符串原样输出；
    }
    
    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] arr = new int[n][n];
        final int tabWidth = 4;

        for(int i = 0; i < n; i++) {
            arr[i][0] = 1;
            arr[i][i] = 1;
        }

        for(int i = 2; i < n; i++) {
            for(int j = 1; j < i; j++) {
                arr[i][j] = arr[i-1][j-1] + arr[i-1][j];
            }
        }

        for(int i = 0; i < n; i++) {
            for(int j = 0; j <= i; j++) {
                System.out.printf("%5s", String.valueOf(arr[i][j]));

            }
            System.out.println();
        }

//        for(int i = 0; i < n; i++) {
//            for(int j = 0; j <= i; j++) {
//                System.out.printf("%-4s", String.valueOf(arr[i][j]));
//            }
//            System.out.println();
//        }

    }
}